let app = getApp();
let util = app.globalData.util;
let wxApi = app.globalData.wxApi;
let Api = app.globalData.Api;
Page({
  data: {
    codes: []
  },
  onLoad(options) {
    wxApi.setNavTitle('编码表')
    console.log(options);
    let type = options.type;
    Api.traningCodesList(type, res => {
      this.setData({
        codes: res
      })
    }) 
  }
})